import React from 'react';
import Modals from '@/components/modals/Modals';
import { GetModelListModels } from '@/common';

interface Props {
  open: boolean;
  onOk: () => void;
  onCancel: () => void;
  value?: GetModelListModels;
}

const index = ({ value, ...props }: Props) => {
  const ModalsTitle = () => {
    return (
      <div>
        <div className="text-base font-bold text-text-5">模型地址</div>
        <div className="mt-1 text-xs leading-5 text-text-3">模型信息已复制到剪贴板</div>
      </div>
    );
  };

  return (
    <Modals {...props} title={<ModalsTitle />} footerCancelHidden>
      <div className="text-sm leading-[22px] text-text-4">
        <div className="flex gap-2">
          <div>模型名称:</div>
          <div>{value?.name}</div>
        </div>
        <div className="flex gap-2">
          <div>API秘钥:</div>
          <div>{value?.api_key}</div>
        </div>
        <div className="flex gap-2">
          <div>API地址:</div>
          <div>{value?.base_url}</div>
        </div>
      </div>
    </Modals>
  );
};

export default index;
